package org.csmz2333;

import java.util.Scanner;

public class 水仙花 {
    public static void main(String[]args){
        Scanner scanner =new Scanner(System.in);
        int num =scanner.nextInt();
        if (num<100||num>999){
            System.out.println("不是水仙花数");
            return;
        }
       int a =num/100;
        int b =(num/10)%10;
        int c =num % 10;
        if(a*a*a+b*b*b+c*c*c==num){
            System.out.println("是水仙花数");
        }else {
            System.out.println("不是水仙花数");
        }
    }
}
